
<html>
<title> Views </title>
<body>
  <br/>
  <br/>
<?
  /** 
  * Process the header 
  *
  */
  $CFetchers->fetchLstDataHeader($COracle,
                                 $jobId,
                                 $srcDbHdr,
                                 $nHeader,
                                 $lstHeader);
  
?>
  
  <!--------------------- HEADER --------------------->
  <table border='1' class='dedeq' >
  <tr>
    <th> DATE       </th> <td> <?=$lstHeader["TR_DATE"][0] ?>   </td>
    <th> REFERENCE  </th> <td> <?=$lstHeader["REFERENCE"][0] ?> </td>
  </tr>   
  </table>
  <br/>
  <!------------------ END Of HEADER ----------------->

<?
  /**
  * Process detail
  *
  */
  $CFetchers->fetchLstDataDetail($COracle,
                                 $jobId,
                                 $srcDbDtl,
                                 $nDetail,
                                 $lstDetail);
  
?>

  <!--------------------- DETAIL --------------------->
  
  <table border='1' class='dedeq'>
  <tr>
  <th> NO         </th>
  <th> MODEL      </th>
  <th> QTY        </th>
  <th> SER_NUMBER </th>
  <th> REASON     </th>
  </tr>
  <? for($iRow = 0; $iRow < $nDetail; $iRow++): ?>
  
  <?   if($lstDetail["SER_NUMBER"][$iRow] != ""){
    
         $serNumberEnt = $CHtml->formInput("serNumEnt[".$iRow."]",
                                           $lstDetail["SER_NUMBER"][$iRow],
                                           _MODE_READONLY).
                         
                         $CHtml->actionIcon("miniView",
                                            "miniView[".$iRow."]",
                                            15,
                                            15,
                                            "/ecs/images/view.png",
                                            "miniView(\"serNumEnt[".$iRow."]\",
                                                      \"".$iRow."\")");
       }else{
        
         $serNumberEnt = " ";
       }
  ?>
  
    <tr>
      
      <td> <?=$lstDetail["NO"][$iRow] ?>        </td>
      <td> <?=$lstDetail["MODEL"][$iRow] ?>     </td>
      <td> <?=$lstDetail["QTY"][$iRow] ?>       </td>
      <td> <?=$serNumberEnt ?>                  </td>
      <td> <?=$lstDetail["REASON"][$iRow] ?>    </td>
      
    </tr>
  
  <? endfor; ?>      
  
  </table>
  <!---------------- END OF DETAIL ------------------->
  <script>
    
    sayHelloAjax();
    sayHelloMisc();
    
  </script>
</body>

<? $COracle->dc(); ?>
</html>